package com.enki.cigarettes.enums;

/**
 * @author WCS.Wang
 * @version V1.0
 * @Package com.enki.cigarettes.enums
 * @Name aec-middle-admin-api-module
 * @Description: TODO (用一句话描述该文件做什么)
 * @date 2018/11/9
 */
public class AfterSaleEnums {


    /**
     * 售后状态
     */
    public enum AfterSaleStatus {

        AUDIT("审核中", 0, "正在审核中"), AGREE("同意", 1, "同意"), REJECT("驳回", 2, "不同意");

        private String name;
        private int status;
        private String alias;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getAlias() {
            return alias;
        }

        public void setAlias(String alias) {
            this.alias = alias;
        }

        AfterSaleStatus(String name, int status) {
            this.name = name;
            this.status = status;
        }

        AfterSaleStatus(String name, int status, String alias) {
            this.name = name;
            this.status = status;
            this.alias = alias;
        }

        public static String getName(int status) {
            for (AfterSaleStatus at : AfterSaleStatus.values()) {
                if (at.getStatus() == status) {
                    return at.getName();
                }
            }
            return "";
        }

        public static String getAlias(int status) {
            for (AfterSaleStatus ass : AfterSaleStatus.values()) {
                if (ass.getStatus() == status) {
                    return ass.getAlias();
                }
            }
            return "";
        }
    }


    /**
     * 退换货处理类型
     */
    public enum AfterSaleType {

        REWORK("返修", 0), EXCHANGE("换货", 1), REFUND("退货/退款", 2);

        private String name;

        private int type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        AfterSaleType(String name, int type) {
            this.name = name;
            this.type = type;
        }

        public static String getName(int type) {
            for (AfterSaleType at : AfterSaleType.values()) {
                if (at.getType() == type) {
                    return at.getName();
                }
            }
            return "";
        }
    }

}
